/*
 * TransferRequest.java
 *
 * Created on 12 October 2007, 15:10
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package fecchi;

import java.net.Proxy;
import java.net.URL;
import java.util.Observable;

/**
 * Observable by the main elements of the application and observes
 * @author rcc4
 */
public class TransferRequest extends Observable {

    private URL url;
    private URL locationOnDisk;
    private long bytesRecieved;
    private int secondsNotify;
    private Proxy proxy;
    /* ToDo: Create class for this */
    private String status;
    
    public TransferRequest() {
        this.setProxy(Proxy.NO_PROXY);
    }
    
    public TransferRequest(URL url, URL locationOnDisk){
        this.setUrl(url);
        this.setLocationOnDisk(locationOnDisk);
        this.setProxy(Proxy.NO_PROXY);
    }

    public URL getUrl() {
        return url;
    }

    public void setUrl(URL url) {
        this.url = url;
    }

    public URL getLocationOnDisk() {
        return locationOnDisk;
    }

    public void setLocationOnDisk(URL locationOnDisk) {
        this.locationOnDisk = locationOnDisk;
    }

    public long getBytesRecieved() {
        return bytesRecieved;
    }

    public void setBytesRecieved(long bytesRecieved) {
        this.bytesRecieved = bytesRecieved;
    }

    public int getSecondsNotify() {
        return secondsNotify;
    }

    public void setSecondsNotify(int secondsNotify) {
        this.secondsNotify = secondsNotify;
    }

    public Proxy getProxy() {
        return proxy;
    }

    public void setProxy(Proxy proxy) {
        this.proxy = proxy;
    }

    public String getStatus() {
        
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
        this.notifyObservers(this.status);
    }
}
